from django.db import models
from utils.basemodel import basemodel


# Create your models here.

class user(basemodel):
    id = models.AutoField(primary_key=True, verbose_name="id")
    usercode = models.CharField(max_length=30, verbose_name="账号", unique=True, null=True,blank=True)
    phone = models.CharField(max_length=11, verbose_name="手机号", unique=True,null=True,blank=True)
    email = models.CharField(max_length=30, verbose_name="邮箱", unique=True, null=True,blank=True)
    password = models.CharField(max_length=30, verbose_name="密码", unique=True, null=True,blank=True)
    url = models.CharField(max_length=500, verbose_name="头像", null=True, blank=True)
    score = models.IntegerField(default=0)

    class Meta:
        db_table = "user"

    def __str__(self):
        return self.usercode
